package charts.series.pies; 
import chart.Structs.PieStyleStruct;
import chart.Structs.AnimateStruct;

class DefaultPieProperties extends Properties {

	public function new(json:Dynamic) {
		// Tr.ace_json(json);
		
		// the user JSON can override any of these:
// 		var parent:Properties = new Properties( {
// 			alpha:				0.5,
// 			'start-angle':		90,
// 			'label-colour':		null,  // null means use colour of the slice
// 			'font-size':		10,
// 			'gradient-fill':	false,
// 			stroke:				1,
// 			colours:			["#900000", "#009000"],	// slices colours
// 			animate:			[{"type":"fade-in"}],
// 			tip:				'#val# of #total#',	// #percent#, #label#
// 			'no-labels':		false,
// 			'on-click':			null
// 			} );

		var animate = new Array<AnimateStruct>();
		animate.push({type:"fade-in"});

		var obj:PieStyleStruct = {
			alpha:			0.5
			, animate:		animate // [{"type":"fade-in"}]
			, colours:		["#900000", "#009000"]	// slices colours
			, font_size:		10
			, label_colour:		null  // null means use colour of the slice
			, no_labels:		false
			, onclick:		null
			, start_angle:		90
			, gradient_fill:	false
			, stroke:		1
			, tip:			'#val# of #total#'	// #percent#, #label#
		};

		var parent = new Properties(obj);
				
		super( json, parent );
		
		//traces('4', this.get('start-angle'));
		// Tr.acesPortMe('4', this.get('colour'));
		// Tr.acesPortMe('4', this.get('type'));
	}
}
